package com.xqboss.apps.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.xqboss.apps.domain.BaseTable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 用户身份等级-多卡槽配置
 * </p>
 *
 * @author admin
 * @since 2024-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserIdentityRankSlot对象", description="用户身份等级-多卡槽配置")
public class UserIdentityRankSlot extends BaseTable implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "卡槽主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户身份等级id")
    @NotNull(message = "用户身份等级id不能为空")
    private Long identityRankId;

    @ApiModelProperty(value = "用户身份等级名称")
    @TableField(exist = false)
    private String identityRankName;

    @ApiModelProperty(value = "用户身份id")
    @TableField(exist = false)
    private Long identityId;

    @ApiModelProperty(value = "卡槽类型 0免费 1续费")
    @Min(value = 0, message = "卡槽类型只能为0或1")
    @Max(value = 1, message = "卡槽类型只能为0或1")
    private Integer type;

    @ApiModelProperty(value = "有效期（天），0表示永久有效")
    @Min(value = 0, message = "有效期不能小于0")
    private Integer expiration;

    @ApiModelProperty(value = "续费消耗热豆")
    @Min(value = 0, message = "续费消耗热豆不能小于0")
    private BigDecimal hotBeans;

    @ApiModelProperty(value = "续费消耗扳手")
    @Min(value = 0, message = "续费消耗扳手不能小于0")
    private BigDecimal wrench;

    @ApiModelProperty(value = "续费消耗力豆")
    @Min(value = 0, message = "续费消耗力豆不能小于0")
    private BigDecimal lidou;

}
